from pymysql import connect

conn=connect(user='root',  # The first four arguments is based on DB-API 2.0 recommendation.
        password="",
        host='192.168.20.244',
        database='ecshop',

        port=3306,)
cursor=conn.cursor()

sql='select goods_sn,goods_name from ecs_goods limit 0,10'
cursor.execute(sql)
result=cursor.fetchmany(3)
print(result)


# cursor = conn.cursor()
# sql = "delete from ecs_goods where goods_name='布兰妮牌香皂'"
# cursor.execute(sql)
#
# cursor.close()
# conn.close()

